<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>最佳拍档</title>
    <meta name="keywords" content="最佳拍档">
    <meta name="description" content="最佳拍档">
    <link rel="stylesheet" type="text/css" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/common/admin/css/style.css}">
    <script th:src="@{/layui/layui.js}" src="/layui/layui.js"></script>
    <script th:src="@{/common/js/jquery-3.3.1.min.js}" src="/common/js/jquery-3.3.1.min.js"></script>
    <script th:src="@{/common/js/common.js}" src="/common/js/common.js"></script>
    <style>
        .right h2{
            margin: 10px 0;
        }
        .right li{
            margin-bottom: 10px;
        }
        header .breadcrumb i {
            float: left;
            padding-left: 20px;
        }
    </style>
</head>

<div id="app">

    <header>
        <h1 v-text="webname" style="width: 200px;"></h1>
        <div class="breadcrumb">
            <i class="layui-icon">&#xe715;</i>
        </div>
        <div style="float: right;text-align: left;padding-right: 20px;">
            <span th:text="${loginUser.username}"></span>，欢迎您！
<!--            <span><a target="_blank" th:href="@{${@environment.getProperty('sso.url')}+'/editpass?redirect_url='+${#httpServletRequest.requestURL}}">修改密码</a></span>-->
            <span><a target="_blank" th:href="@{${#httpServletRequest.getContextPath()}+'/editpass?redirect_url='+${#httpServletRequest.requestURL}}">修改密码</a></span>
            <span style="padding-left: 5px;"><a th:href="@{${#httpServletRequest.getContextPath()} + '/logout'}">退出</a></span>
        </div>
    </header>
    <div class="main">
        <div>
            <ul class="layui-nav layui-nav-tree layui-nav-side" style="padding-top: 50px;">
                <li class="layui-nav-item" th:if="${userRole.indexOf('common') != -1 || userRole.indexOf('upstreamSales') != -1 || userRole.indexOf('downstreamSales') != -1 || userRole.indexOf('deptManage') != -1 || userRole.indexOf('busineManage') != -1 || userRole.indexOf('salesManage') != -1 || userRole.indexOf('taobaoManage') != -1 || userRole.indexOf('priceClerk') != -1}">
                    <a href="javascript:;">上游品牌</a>
                    <dl class="layui-nav-child">
                        <dd th:if="${userRole.indexOf('common') != -1 || userRole.indexOf('upstreamSales') != -1 || userRole.indexOf('downstreamSales') != -1 || userRole.indexOf('deptManage') != -1 || userRole.indexOf('busineManage') != -1 || userRole.indexOf('salesManage') != -1}"><a href="/Admin/Brand/BrandMerchant">品牌商家</a></dd>
                        <dd th:if="${userRole.indexOf('common') != -1 || userRole.indexOf('upstreamSales') != -1 || userRole.indexOf('downstreamSales') != -1}"><a href="/Admin/Brand/CollectionBrand">收藏品牌</a></dd>
                        <dd th:if="${userRole.indexOf('common') != -1 || userRole.indexOf('upstreamSales') != -1 || userRole.indexOf('downstreamSales') != -1 || userRole.indexOf('deptManage') != -1 || userRole.indexOf('busineManage') != -1 || userRole.indexOf('salesManage') != -1 || userRole.indexOf('taobaoManage') != -1 || userRole.indexOf('priceClerk') != -1}"><a href="/Admin/Commodity/CommodityManagement">商品管理</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item" th:if="${userRole.indexOf('common') != -1 || userRole.indexOf('upstreamSales') != -1 || userRole.indexOf('downstreamSales') != -1 || userRole.indexOf('deptManage') != -1 || userRole.indexOf('busineManage') != -1}">
                    <a href="javascript:;">下游团长</a>
                    <dl class="layui-nav-child">
                        <dd  th:if="${userRole.indexOf('common') != -1 || userRole.indexOf('upstreamSales') != -1 || userRole.indexOf('downstreamSales') != -1 || userRole.indexOf('deptManage') != -1 || userRole.indexOf('busineManage') != -1}"><a href="/Admin/GroupPurchase/CommunityLeader">社区团长</a></dd>
                        <dd th:if="${userRole.indexOf('common') != -1 || userRole.indexOf('upstreamSales') != -1 || userRole.indexOf('downstreamSales') != -1}"><a href="/Admin/GroupPurchase/CollectionGroupPurchase">收藏团长</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item" th:if="${userRole.indexOf('deptManage') != -1 || userRole.indexOf('busineManage') != -1 || userRole.indexOf('salesManage') != -1}">
                    <a href="javascript:;">销售管理</a>
                    <dl class="layui-nav-child">
                        <dd th:if="${userRole.indexOf('deptManage') != -1 || userRole.indexOf('busineManage') != -1 || userRole.indexOf('salesManage') != -1}"><a href="/Admin/Sales/SalesManagement">销售详情</a></dd>
                        <dd th:if="${userRole.indexOf('deptManage') != -1 || userRole.indexOf('busineManage') != -1}"><a href="/Admin/Sales/AssistantManagement">助理管理</a></dd>
                    </dl>
                </li>
            </ul>
        </div>

        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <iframe th:replace="${Tab}" frameborder="0" name="content" width="100%" id="home"></iframe>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">

    //注意：导航 依赖 element 模块，否则无法进行功能性操作
    layui.use('element', function(){
        var element = layui.element;
    });
</script>

</html>